import axios from '../AxiosConfig.js'

export const getIndexVDO = (catalogUkId, page) => {
    return axios({
        method: 'get',
        url: '/api/blog/article/vdo/index',
        params: {
            "catalogUkId": catalogUkId,
            "current": page.current,
            "size": page.size
        }
    })
}

export const createArticle = (data) => {
    return axios({
        method: 'post',
        url: '/api/blog/article',
        data: data
    })
}

export const updateArticle = (data) => {
    return axios({
        method: 'put',
        url: '/api/blog/article',
        data: data
    })
}

export const deleteArticle = (ukId) => {
    return axios({
        method: 'delete',
        url: '/api/blog/article',
        params: {"ukId": ukId}
    })
}

export const selectArticle = (ukId) => {
    return axios({
        method: 'get',
        url: '/api/blog/article',
        params: {"ukId": ukId}
    })
}


export const selectArticleDetails = (ukId) => {
    return axios({
        method: 'get',
        url: '/api/blog/article/details',
        params: {"ukId": ukId}
    })
}

export const listArticle = (catalogUkId, page) => {
    return axios({
        method: 'get',
        url: '/api/blog/article/list/catalog',
        params: {
            "catalogUkId": catalogUkId,
            "current": page.current,
            "size": page.size
        }
    })
}






